var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push( {
	name: 'TibiaWikia',
	version: '0.1',
	prepareImgLinks: function(callback) {
		var res = [];
		$("span.wikia-gallery-item").each(function() {
			var link = $(this).find('a.image.lightbox:eq(0)');
			var caption = $(this).find('span.lightbox-caption:eq(0)');
			if(link) {
				var src = link.css('background-image').match(/url\((.*?)\/\d+px-.*?\)/i)[1];
				src = src.replace(/thumb\//i,'');
				$(link).data('hoverZoomSrc', [src]);
				$(link).data('hoverZoomCaption', caption.html());
				res.push(link);
			}
		});
		callback($(res));
	}
});
